/**
 * Copyright (c) 2009  Collaborative Development Group, C.S. Dept., University of Bari
 *
 * All rights reserved. This program and the accompanying materials are made available under
 * the terms of the Eclipse Public License v1.0  which accompanies this distribution, and is 
 * available at http://www.eclipse.org/legal/epl-v10.html
 */
package it.uniba.di.cdg.jtalk.core;

import com.google.inject.Singleton;

/**
 * Server configuration.
 * For GTalk configuration see http://www.google.com/support/talk/bin/answer.py?answer=57557 .
 */
@Singleton 
public class ServerConfiguration {
	public static final String XMPP_PROVIDER = "ecf.xmpp.smack";
	public static final String XMPP_SECURE_PROVIDER = "ecf.xmpps.smack";

	private String serverHost = "talk.google.com"; 
	
	private int serverPort = 5223;
	
	private boolean isSecure = true;

	/**
	 * @return the serverHost
	 */
	public String getServerHost() {
		return serverHost;
	}

	/**
	 * @param serverHost the serverHost to set
	 */
	public void setServerHost( String serverHost ) {
		this.serverHost = serverHost;
	}

	/**
	 * @return the serverPort
	 */
	public int getServerPort() {
		return serverPort;
	}

	/**
	 * @param serverPort the serverPort to set
	 */
	public void setServerPort( int serverPort ) {
		this.serverPort = serverPort;
	}

	/**
	 * @return the isSecure
	 */
	public boolean isSecure() {
		return isSecure;
	}

	/**
	 * @param isSecure the isSecure to set
	 */
	public void setSecure( boolean isSecure ) {
		this.isSecure = isSecure;
	}

	public String getProviderId() {
		return isSecure() ? XMPP_SECURE_PROVIDER : XMPP_PROVIDER;
	}
}
